Write-erase endurance lifetime of memory storage devices

ABSTRACT

A memory management system and method for managing memory blocks of a memory device of a computer. The system includes a free block data structure including free memory blocks for writing, and sorting the free memory blocks in a predetermined order based on block write-erase endurance cycle count and receiving new user-write requests to update existing data and relocation write requests to relocate existing data separately, a user-write block pool for receiving youngest blocks holding user-write data (i.e., any page being updated frequently) from the free block data structure, a relocation block pool for receiving oldest blocks holding relocation data (i.e., any page being updated infrequently) from the free block data structure, and a garbage collection pool structure for selecting at least one of user-write blocks and relocation blocks for garbage collection, wherein the selected block is moved back to the free block data structure upon being relocated and erased.

BACKGROUND

The present invention relates to data storage devices, and morespecifically, to a memory management system and method for improvingwrite-erase endurance lifetime of a flash-based solid state drive (SDD)device via data placement, garbage collection and wear-levelingprocesses.

Currently, SSD devices based on NAND-flash memories are used as theprimary storage in computer architecture, ranging from notebooks toenterprise storage systems. These devices provide random I/O performanceand access latency that are orders of magnitude better than that ofrotating hard-disk drives (HDD). Moreover, SSDs significantly reducepower consumption and dramatically improve robustness and shockresistance. NAND-flash memories are organized in terms of blocks, whereeach block consists of a fixed number of pages and the block is theelementary unit for an erase operation, whereas reads and writes areprocessed in terms of pages. Before data can be written to a page (thepage is programmed with the data) in a block, the block has to be erasedbeforehand. Having larger blocks as the unit of erase and smaller pagesas the unit of read and write in an SSD leads to “write amplification”where the SSD has to do overhead housekeeping writes when servicing userwrites from the host system. The NAND-flash memories have a limitedwrite-erase cycle count. Typically, flash chips based on single-levelcells (SLC) sustain 10⁵ and those based on multi-level cells (MLC) 10⁴program-erase cycles.

Flash memory uses relocate-on-write (i.e., out-of-place write) forperformance reasons, for example. If write-in-place is used instead,flash will exhibit high latency due to the necessary reading, erasingand reprogramming (i.e., writing) of the entire block in which the datais being updated. The management of out-of-place updates involves amapping between logical block addresses (LBA) that are assigned to eachuser page write, and physical block addresses (PBA) which are thephysical page addresses in flash memory.

Relocate-on-write necessitates a garbage collection process whichresults in a performance penalty for additional read and writeoperations. The number of read and write operations resulting fromgarbage collection depends on the block utilization.

Flash memory blocks eventually wear out with progressing number ofwrite-erase cycles until they can no longer be erased or written.Wear-leveling techniques are therefore used to exhaust the cycle budgetof as many blocks as possible, in order to serve as many user writes aspossible (i.e., to maximize endurance). The SSD device may eventuallydie with a number of unconsumed cycle budget left when garbagecollection can no longer return a free block, referred to as“wear-leveling insufficiency”.

Uneven wear-out of flash memory blocks is mainly due to spatiallocalities in workloads. The wear-out of blocks gradually becomesincreasingly unbalanced. Static wear-leveling is commonly used to dealwith this cause of uneven wear-out by forcing the migration of cold data(i.e., data which is not updated frequently) from new blocks to oldblocks and freeing the newer blocks for holding hot data. The increaseof write amplification due to static wear-leveling depends on howfrequently cold data is moved around. Both garbage collection andwear-leveling contribute write operations in addition to user writes,hence, the write-erase endurance lifetime which can be measured by thetotal number of user writes that can be served, depends on the totalcycle budget available, write amplification, and the eventual unconsumedcycle budget due to wear-leveling insufficiency.

Today, wear-leveling has been recognized as a standard way to improvethe endurance lifetime of flash-based SSD devices. However, theendurance lifetime of the SSD device depends not only on wear-levelingbut also data placement and garbage collection.

SUMMARY

The present invention provides a method and system that improves thewrite-erase endurance lifetime of a flash-based SSD via a combination ofdata placement, garbage collection and wear-leveling processes.

According to an embodiment of the present invention, a memory managementsystem for a memory device of a computer is provided. The systemincludes a free block data structure including a plurality of freememory blocks for writing, the free block data structure configured tosort the free memory blocks in a predetermined order based on blockwrite-erase endurance cycle count. The free block data structure isfurther configured to receive new user-write requests to update existingdata and relocation write requests to relocate existing data separatelysuch that user-write data from new user-write requests are placed onyoungest free memory blocks having lower block write-erase endurancecycle count while relocation data from relocation requests are placed onoldest free memory blocks having higher block write-erase endurancecycle count than that of the youngest free memory blocks. The systemfurther includes a user-write data structure configured to receiveuser-write memory blocks holding the user-write data from the free blockdata structure, a relocation data structure configured to receiverelocation memory blocks holding the relocation data from the free blockdata structure, and a garbage collection pool structure configured toselect at least one of the user-write blocks and relocation blocks forerasure, wherein the selected block is moved to the free block datastructure upon being erased.

According to another embodiment of the present invention, a memorymanagement system for a memory device of a computer is provided. Thesystem includes a free block data structure including a plurality offree memory blocks for writing, the free block data structure isconfigured to sort the free memory blocks in a predetermined order basedon block write-erase endurance cycle count. The free block datastructure is also configured to receive new user-write requests toupdate existing data and relocation write requests to relocate existingdata such that user-write data from new user-write requests are placedon youngest free memory blocks having lower block write-erase endurancecycle count while relocation data from relocation requests are placed onoldest free memory blocks having higher block write-erase endurancecycle count than that of the youngest free memory blocks. The systemfurther includes a delay block data structure configured to receivememory blocks holding the user-write data and memory blocks holding therelocation data from the free block data structure and delay the memoryblocks from being immediately selected as a candidate for garbagecollection, and a garbage collection pool structure configured toreceive memory blocks from the delay block data structure, and select atleast one of the memory blocks for erasure, wherein the selected memoryblock is moved to the free block data structure upon being erased.

According to yet another embodiment of the present invention, acomputer-implemented method of managing memory blocks within a memorydevice of a computer is provided. The method includes maintaining freememory blocks for writing in a predetermined order based on blockwrite-erase endurance cycle count and receiving new user-write requeststo update existing data and relocation write requests to relocateexisting data, placing user-write data from the new user-write requestson youngest free memory blocks having lower block write-erase endurancecycle count, placing relocation data from the relocation write requestson oldest free memory blocks having higher block write-erase endurancecycle count than that of the youngest free memory blocks, maintaininguser-write memory blocks holding the user-write data and relocationmemory blocks holding the relocation data, and selecting at least one ofthe user-write memory blocks or the relocation memory blocks forerasure.

According to another embodiment of the present invention, a computerprogram product implemented the above-mentioned method is also provided.

Additional features and advantages are realized through the techniquesof the present invention. Other embodiments and aspects of the inventionare described in detail herein and are considered a part of the claimedinvention. For a better understanding of the invention with theadvantages and the features, refer to the description and to thedrawings.

BRIEF DESCRIPTION OF THE SEVERAL VIEWS OF THE DRAWINGS

The subject matter which is regarded as the invention is particularlypointed out and distinctly claimed in the claims at the conclusion ofthe specification. The forgoing and other features, and advantages ofthe invention are apparent from the following detailed description takenin conjunction with the accompanying drawings in which:

FIG. 1 is a block diagram illustrating a flash memory management systemthat can be implemented within embodiments of the present invention.

FIG. 2 is a block diagram illustrating a flash memory management systemthat can be implemented within alternative embodiments of the presentinvention.

FIG. 3 is a flowchart illustrating a method for managing memory blocksin a memory device that can be implemented within embodiments of thepresent invention.

FIG. 4 is a block diagram of a general purpose computer that can beimplemented within embodiments of the present invention.

DETAILED DESCRIPTION

With reference now to FIG. 1, there is a flash memory management systemthat can be implemented within an embodiment of the present invention.One embodiment of the present invention uses data placement, garbagecollection and wear-leveling processes based on separation andprediction to improve the write-erase endurance lifetime of aflash-based SSD device. The system 10 dynamically separates blocks withdynamic data pages from blocks with static data pages (i.e., pages withfewer updates) based on the prediction that dynamic data tends to wearout blocks faster than those with static data and therefore the dynamicdata pages are placed on younger blocks which have the lower blockwrite-erase endurance cycle count (i.e., the higher remaining unconsumedcycle count) and static data pages are placed on older blocks wheneverpossible.

As shown in FIG. 1, a memory management system 10 for a memory device ofa computer (as depicted in FIG. 4) is provided. The system 10 includes afree block data structure 12 (i.e., a free block pool) including aplurality of free memory blocks 14 for writing. The free block pool 12sorts the free memory blocks 14 in a predetermined order based on blockwrite-erase endurance cycle count. For example, according to oneembodiment of the present invention, the free memory blocks 14 aresorted in an ascending order based upon the block write-erase endurancecycle count such that the left-most free memory block 14 has the leastwrite-erase endurance cycle count and the right-most free memory block14 has the highest write-erase endurance count. That is, the free memoryblocks 14 are sorted from youngest to oldest based on block write-eraseendurance count. According to an embodiment of the present invention,the free block pool 12 receives new user-write requests via a user ofthe system 10, to update existing data and relocation write requests viaa garbage collection process (inside the system 10), to relocateexisting data separately. According to an embodiment of the presentinvention, the system 10 separates user-write data stream fromrelocation data stream since the relocation data pages can be consideredas more “static” compared to user data pages.

According to an embodiment of the present invention, if the system 10includes blocks with different write-erase cycle budgets, for example,if there is a mix of single-level cells (SLC) and multi-level cells(MLC) Flash, the free block pool 12 is organized according to theremaining write-erase cycle count of the block, with the block havingthe highest remaining (unconsumed) write-erase cycle count to the left(i.e., the youngest block).

Further, as shown in FIG. 1, the system 10 includes a user-write datastructure 16 (i.e., a user-write block pool) and a relocation datastructure 20 (i.e., a relocation block pool). According to an embodimentof the present invention, when the left-most free memory block 14 isfilled up with user-write data pages, the memory block 14 is thenremoved from the free block pool 12 and is pushed into the user-writeblock pool 16. Further, when the right-most memory block 14 is filled upwith relocation data pages, it is then removed from the free block pool12 and pushed into the relocation block pool 20. According to anembodiment of the present invention, both the user-write block pool 16and the relocation block pool 20 may be managed by a data structure, andin the current embodiment, the pool is managed by a queue datastructure, meaning that the newly-filled up block is placed at the endof each queue. Thus, the user-write data structure 16 receivesuser-write memory blocks 18 holding user-write data pages from the freeblock pool 12 and the relocation block pool 20 receives relocationmemory blocks 22 (i.e., the last memory blocks) holding relocation datapages from the free block pool 12. This is to say, according to anembodiment of the present invention, user-write data pages are placed onyoungest block and the relocation data pages on the oldest block in thefree block pool 12.

According to an embodiment of the present invention, the system 10further includes a garbage collection pool structure 24 that selects atleast one block from a combination of a few of the user-write memoryblocks 18 and the relocation memory blocks 22 from the user-write blockpool 16 or relocation block pool 20.

According to an embodiment of the present invention, a flash controllerof the memory storage device may control the above-mentioned datastructures as well as the functions of the garbage collection poolstructure 24. According to one embodiment of the present invention, awindowed garbage collection process is implemented based on apredetermined rule for selection. The garbage collection process istriggered by monitoring the number of free memory blocks 14 in the freeblock pool 12 in order to guarantee a minimum number of free memoryblocks 14. The garbage collection process looks for a memory blockwithin a window of user-write memory blocks 18 starting from theleft-most in the user-write block pool 16 and a window of relocationmemory blocks 20 starting from the leftmost in the relocation block pool22.

According to an embodiment of the present invention, the blocks to beselected for garbage collection may come from either the user-writeblock pool 16 or the relocation block pool 20. According to anembodiment of the present invention, the garbage collection process maybe performed over a window of s+t blocks, where s candidate blocks arefrom the user-write block pool 16 and t candidate blocks are from therelocation block pool 20, and s blocks and t blocks are from thebeginning of each data structure 16 and 20 which are those blocksentering into pool at earlier times. According to an embodiment of thepresent invention, the window size of s candidate blocks in theuser-write block pool 16 and the window size of t candidate blocks inthe relocation block pool 20 may be equal or unequal.

According to an embodiment of the present invention, the garbagecollection process is performed by selecting a block for recycling fromthe garbage collection window of s+t according to a predetermined rule.There are several rules which may be implemented within embodiments ofthe present invention. For example, one embodiment of the presentinvention is based on the following rule, to achieve a good level ofwear-leveling while maintaining a high reclaiming efficiency:

If all blocks in the system 10 have N_(p) pages and the averageremaining (unconsumed) cycle count at the time of garbage collection isA. The following rule is used to select the j*-th block for garbagecollection such thatj*=arg max(WI _(j) +D _(j)) for j=0, . . . , (s+t)−1

where W is an appropriate weight factor taking an integer value largerthan 1 and D_(j)=max(C_(j)−A, 0), and where I_(j) is the number ofinvalid data pages on the j-th block of the s+t blocks in the garbagewindow, where j=0, . . . , (s+t)−1 and C_(j) represents the remaining(unconsumed) endurance cycle count of the respective block. According toan embodiment of the present invention, W can be selected via simulationto maximize the endurance lifetime of the system 10.

Upon selecting a block for garbage collection, the garbage collectionfirst reads all pages on that block that are still valid data pages andthen write the pages to another block. The write requests from garbagecollection are called relocation requests and are placed on oldest freememory blocks 14, as illustrated in FIG. 1. The LBA-to-PBA map tellsgarbage collection which data pages are valid or invalid. A data page isbecoming invalid when the data pages is updated by the user and iswritten to another place. Once all valid data pages of the selectedblock have been relocated, the selected block is then erased. Upon beingsuccessfully erased, the selected block is removed from user-write blockpool 16 or relocation block pool 20, and is put into free block pool 12.

The implementation of a windowed garbage collection process reduceswrite amplification and wear-leveling insufficiency, thereby improvingthe write-erase endurance lifetime of a flash-based storage device.

According to another embodiment of the present invention, the number ofcandidate blocks from the user-write block pool 16 and the relocationblock pool 20 may be changed. For example, if the system 10 is busy witha heavy user write workload, the garbage collection window may bechanged to include blocks from user-write block pool 16 only in order totemporarily maximize recycling efficiency. On the other hand, when thesystem 10 is idle, the garbage collection window may include blocksmostly selected from the relocation block pool 20 and only few blocksselected from the user-write block pool 16, thereby speeding up thewear-leveling process. The present invention is not limited to thesystem shown in FIG. 1 and may vary as necessary. An alternative flashmemory management will be discussed below with reference to FIG. 2.

Instead of managing the user-write block pool 16 and the relocationblock pool 20 separately as shown in FIG. 1, these two pools 16, 20 maybe merged and managed together as shown in FIG. 2 according to anotherembodiment of the present invention as discussed below.

FIG. 2 is a block diagram illustrating a flash memory management systemthat can be implemented within alternative embodiments of the presentinvention. As shown in FIG. 2, a flash memory management system 100having a delay block data structure (i.e., a first in-first out (FIFO)queue) is provided to delay the entry of a newly written block into thegarbage collection pool structure. The flash memory management system100 includes a free block data structure 112 including a plurality offree memory blocks 114 for writing data. The free block data structure112 is configured similar to that shown in FIG. 1. The free block datastructure 112 sorts the free memory blocks 114 in a predetermined orderbased on block write-erase endurance cycle count, and receivesuser-write requests to update existing data and relocation writerequests to relocate existing data onto free memory blocks 114. Further,the system 110 includes a delay block data structure 116 which receivesfirst (i.e., the youngest) memory blocks 118 holding user-write datapages (which may be more dynamic) and the last (the oldest) memoryblocks 120 holding relocation data pages (which may be comparablystatic) from the free block data structure 112. As mentioned above,according to an embodiment of the present invention, the delay blockdata structure 116 may be a FIFO queue in which a newly-filled up block118 either holding user-write data pages or relocation ones, is pushedonto the delay block data structure 116 on one side. Every time there isa block 118 being pushed onto the delay block data structure 116 on oneside, there is a block 118 being pushed out of the delay block datastructure 116 from the other (i.e., opposite) side, and that block 118then enters into a garbage collection pool structure 122, as illustratedin FIG. 2. Thus, the garbage collection pool structure 122 receivesmemory blocks 118 from the delay block data structure 116, and selectsat least one of the memory blocks 118 for garbage collection. Upon datapages being relocated and the block 118 being erased, the selected block118 is moved to the free block data structure 112 for writing data. Amethod for managing memory blocks within a memory device will now bediscussed below with reference to FIG. 3.

FIG. 3 is a flowchart illustrating a method for managing memory blocksin a memory device that can be implemented within embodiments of thepresent invention. In FIG. 3, at operation 300, free memory blocks forwriting are maintained in a predetermined order (from the youngest tothe oldest, for example) based on block write-erase endurance cyclecount. New user-write requests to update existing data are receivedalong with relocation write requests to relocate existing data onto thefree memory blocks. According to an embodiment of the present invention,free memory blocks are maintained by being sorted in an ascending orderbased on block write-erase endurance cycle count such that the left-mostfree memory block is the youngest and the right-most free memory blockis the oldest, namely has a least amount remaining (unconsumed) cyclecount.

From operation 300, the process moves to operation 310 where user-writedata from the new user-write requests are placed on youngest free memoryblocks. Upon filling up the youngest free memory block with user-writepages, the youngest memory block (i.e., now a user-write memory block)is removed from the free block pool and pushed into a user-write blockpool where it is maintained. According to an embodiment of the presentinvention, inside the free block pool the second youngest memory blocknow emerges as the youngest memory block and is used to hold user-writerequests.

According to an embodiment of the present invention, it may bedetermined whether a data page involved is frequently updated or not. Incase a data page is infrequently being updated, the page is placed onthe oldest free memory blocks, similar to the relocation requests.

From operation 310, the process moves to operation 312 where relocationdata pages from the relocation requests are placed on oldest free memoryblocks which have data that is least frequently updated. Once the oldestfree memory block is filled up with relocation data pages, is the oldestfree memory block (i.e. now a relocation memory block) is removed fromthe free block pool and it enters a relocation block pool where it ismaintained.

According to an embodiment of the present invention, both the user-writeblock pool and the relocation block pool can be managed by queue datastructure, namely the newly filled-up blocks enter from one end of thequeue, and the garbage collection window is set on the other end of thequeue.

From operation 312, the process moves to operation 314 where at leastone of the memory blocks of the user-write memory blocks and therelocation memory blocks is selected for garbage collection. Accordingto an embodiment of the present invention, the at least one memory blockis selected with a window for erasure based on a predetermined rule.According to one embodiment of the present invention, the at least onememory block is selected from a window of user-write memory blocks and awindow of relocation blocks, which are managed separately. According toanother embodiment, the at least one memory block may be selected from awindow formed by a combination of user-write memory blocks andrelocation memory blocks that are managed together. That is, as shown inFIG. 2, the user-write block pool is merged with relocation block pool.

Generally, the flash memory management systems and method for managingmemory blocks within a memory device according to embodiments of thepresent invention as described herein are practiced with ageneral-purpose computer and the method may be coded as a set ofinstructions on removable or hard media for use by the general-purposecomputer. FIG. 4 is a schematic block diagram of a general-purposecomputer suitable for practicing the present invention embodiments. InFIG. 4, computer system 400 has at least one microprocessor or centralprocessing unit (CPU) 405. CPU 405 is interconnected via a system bus410 to a random access memory (RAM) 415, a read-only memory (ROM) 420,an input/output (I/O) adapter 425 for a connecting a removable dataand/or program storage device 430 and a mass data and/or program storagedevice 435, a user interface adapter 440 for connecting a keyboard 445and a mouse 450, a port adapter 455 for connecting a data port 460 and adisplay adapter 465 for connecting a display device 470.

ROM 420 contains the basic operating system for computer system 400. Theoperating system may alternatively reside in RAM 415 or elsewhere as isknown in the art. Examples of removable data and/or program storagedevice 430 include magnetic media such as floppy drives and tape drivesand optical media such as CD ROM drives. Examples of mass data and/orprogram storage device 435 include hard disk drives and non-volatilememory such as flash memory. In addition to keyboard 445 and mouse 450,other user input devices such as trackballs, writing tablets, pressurepads, microphones, light pens and position-sensing screen displays maybe connected to user interface 440. Examples of display devices includecathode-ray tubes (CRT) and liquid crystal displays (LCD).

A computer program with an appropriate application interface may becreated by one of skill in the art and stored on the system or a dataand/or program storage device to simplify the practicing of thisinvention. In operation, information for or the computer program createdto run the present invention is loaded on the appropriate removable dataand/or program storage device 430, fed through data port 460 or typed inusing keyboard 445.

In view of the above, the present method embodiment may therefore takethe form of computer or controller implemented processes and apparatusesfor practicing those processes. The disclosure can also be embodied inthe form of computer program code containing instructions embodied intangible media, such as floppy diskettes, CD-ROMs, hard drives, or anyother computer-readable storage medium, wherein, when the computerprogram code is loaded into and executed by a computer or controller,the computer becomes an apparatus for practicing the invention. Thedisclosure may also be embodied in the form of computer program code orsignal, for example, whether stored in a storage medium, loaded intoand/or executed by a computer or controller, or transmitted over sometransmission medium, such as over electrical wiring or cabling, throughfiber optics, or via electromagnetic radiation, wherein, when thecomputer program code is loaded into and executed by a computer, thecomputer becomes an apparatus for practicing the invention. Whenimplemented on a general-purpose microprocessor, the computer programcode segments configure the microprocessor to create specific logiccircuits. A technical effect of the executable instructions is toimplement the exemplary method described above.

Embodiments of the present invention include flash memory managementsystem and a method for managing memory blocks within a memory device ofa computer system via data placement (i.e., separation and sorting),garbage collection and wear-leveling. Therefore, the present inventionprovides the advantages of reducing write amplification since the systemdiscloses moving static data into blocks that are relatively older anddynamic data into blocks that are relatively younger. The presentinvention also achieves wear-leveling by balancing the cycle count usageof the various blocks and correcting any possible imbalance whileimproving the performance of the memory device and the endurancelifetime of the memory device by reducing the necessary writeoperations.

The terminology used herein is for the purpose of describing particularembodiments only and is not intended to be limiting of the invention. Asused herein, the singular forms “a”, “an” and “the” are intended toinclude the plural forms as well, unless the context clearly indicatesotherwise. It will be further understood that the terms “comprises”and/or “comprising,” when used in this specification, specify thepresence of stated features, integers, steps, operations, elements,and/or components, but do not preclude the presence or addition of oneore more other features, integers, steps, operations, elementcomponents, and/or groups thereof.

The corresponding structures, materials, acts, and equivalents of allmeans or step plus function elements in the claims below are intended toinclude any structure, material, or act for performing the function incombination with other claimed elements as specifically claimed. Thedescription of the present invention has been presented for purposes ofillustration and description, but is not intended to be exhaustive orlimited to the invention in the form disclosed. Many modifications andvariations will be apparent to those of ordinary skill in the artwithout departing from the scope and spirit of the invention. Theembodiment was chosen and described in order to best explain theprinciples of the invention and the practical application, and to enableothers of ordinary skill in the art to understand the invention forvarious embodiments with various modifications as are suited to theparticular use contemplated

The flow diagrams depicted herein are just one example. There may bemany variations to this diagram or the steps (or operations) describedtherein without departing from the spirit of the invention. Forinstance, the steps may be performed in a differing order or steps maybe added, deleted or modified. All of these variations are considered apart of the claimed invention.

While the preferred embodiment to the invention had been described, itwill be understood that those skilled in the art, both now and in thefuture, may make various improvements and enhancements which fall withinthe scope of the claims which follow. These claims should be construedto maintain the proper protection for the invention first described.

1. A memory management system for a memory device of a computer, thesystem comprising: the memory device; a free block data structureincluding a plurality of free memory blocks for writing, the free blockdata structure configured to sort the free memory blocks in apredetermined order based on block write-erase endurance cycle count andreceive new user-write requests to update existing data and relocationwrite requests to relocate existing data separately such that user-writedata from new user-write requests are placed on youngest free memoryblocks having lower block write-erase endurance cycle count whilerelocation data from relocation requests are placed on oldest freememory blocks having higher block write-erase endurance cycle count thanthat of the youngest free memory blocks, a user-write data structureconfigured to receive user-write memory blocks holding the user-writedata from the free block data structure; a relocation data structureconfigured to receive relocation memory blocks holding the relocationdata from the free block data structure; and a garbage collection poolstructure configured to select at least one of the user-write blocks andrelocation blocks for erasure, wherein the selected block is moved tothe free block data structure upon being erased, wherein the selectedblock is selected from a window comprising user-write memory blocksselected form the user-write data structure and relocation memory blocksselected from the relocation data structure, the window being of a sizes+t, where s is a number of user-write memory blocks in the window and tis a number of relocation memory blocks in the window, s is a number ofuser-write memory blocks less than of the all user write memory blocksin the user-write data structure and t is a number of relocation memoryblocks less than all of the relocation memory blocks in the relocationdata structure.
 2. The system of claim 1, wherein the user-write memoryblocks in the user-write data structure have a highest remainingunconsumed remaining endurance cycle count and the relocation memoryblocks in the relocation data structure have a lowest remainingunconsumed endurance cycle count.
 3. The system of claim 1, wherein theselected block is selected for garbage collection based on apredetermined rule.
 4. The system of claim 1, wherein a size, s, of thewindow of the user-write memory blocks is equal to a size, t of thewindow of relocation memory blocks.
 5. The system of claim 1, wherein asize, s of the window of the user-write memory blocks is unequal to asize, t of the window of relocation memory blocks.
 6. A memorymanagement system for a memory device of a computer, the systemcomprising: the memory device; a free block data structure including aplurality of free memory blocks for writing, the free block datastructure configured to sort the free memory blocks in a predeterminedorder based on block write-erase endurance cycle count; a user-writedata structure configured to receive user-write memory blocks holdingthe user-write data from a first portion of the free block datastructure corresponding to free memory blocks having a low write-eraseendurance cycle count; a relocation data structure configured to receiverelocation memory blocks holding the relocation data from a secondportion of the free block data structure corresponding to free memoryblocks having a high write-erase endurance cycle count; and a garbagecollection pool structure configured to select at least one of theuser-write blocks and relocation blocks for erasure and to transmit theselected block to the free block data structure upon being erased,wherein the selected block is selected from a window comprisinguser-write memory blocks selected form the user-write data structure andrelocation memory blocks selected from the relocation data structure,the window being of a size s+t, where s is a number of user-write memoryblocks in the window and t is a number of relocation memory blocks inthe window, s is a number of user-write memory blocks less than of theall user write memory blocks in the user-write data structure and t is anumber of relocation memory blocks less than all of the relocationmemory blocks in the relocation data structure.
 7. The system of claim6, wherein the user-write data structure is configured to receiveuser-write memory blocks from free memory blocks having lowest blockwrite-erase endurance cycle counts, and the relocation data structure isconfigured to receive relocation memory blocks from free memory blockshaving highest block write-erase endurance cycle counts.
 8. The systemof claim 6, wherein the free block data structure is configured to writedata from new user-write requests to free memory blocks having lowestblock write-erase endurance cycle counts, and the free block datastructure is configured to write data from relocation requests to freememory blocks having highest block write-erase endurance cycle counts.9. The system of claim 6, wherein the user-write data structure and therelocation data structure are configured to store user-write memoryblocks and relocation memory blocks, respectively, in order based onblock write-erase endurance cycle count.
 10. The system of claim 9,wherein the garbage collection pool structure is configured to selectfor erasure the at least one user-write blocks and relocation blockshaving a lowest write-erase endurance cycle count among the user-writememory blocks and relocation memory blocks in the window.
 11. The systemof claim 9, wherein the garbage collection pool structure is configuredto select for erasure from among the user-write memory blocks andrelocation memory blocks in the window the at least one user-writeblocks and relocation blocks based on an order in which the at least oneuser-write blocks and relocation blocks are received into the user-writedata structure and the relocation data structure, respectively.
 12. Thesystem of claim 6, wherein the garbage collection pool structure isconfigured to adjust a ratio of user-write memory blocks, s relative tothe relocation memory blocks, t, in the window based on a weight of auser-write workload.
 13. The system of claim 6, wherein the selectedblock is selected based on a number of invalid data pages in theselected block, the endurance cycle count of the selected block, and apredetermined weight factor.
 14. A computer-program product, comprising:a processor; and memory having stored thereon a computer program which,upon execution by the processor, performs a method comprising: arrangingwith the processor a plurality of free memory blocks in a block datastructure based on a block write-erase endurance cycle count of theplurality of flee memory blocks; writing data from user-write datarequests to free memory blocks having lowest block write-erase endurancecycle counts and storing resulting user-write data blocks in auser-write data structure; writing data from relocation data requests tofree memory blocks having highest block write-erase endurance cyclecounts and storing resulting relocation data blocks in a relocation datastructure; and selecting for a garbage collection operation at least oneof the user-write blocks and relocation blocks for erasure, wherein theselected block is selected from a window comprising user-write memoryblocks selected form the user-write data structure and relocation memoryblocks selected from the relocation data structure, the window being ofa size s+t, where s is a number of user-write memory blocks in thewindow and t is a number of relocation memory blocks in the window, s isa number of user-write memory blocks less than of the all user writememory blocks in the user-write data structure and t is a number ofrelocation memory blocks less than all of the relocation memory blocksin the relocation data structure.
 15. The computer program product ofclaim 14, further comprising storing the user-write memory blocks andrelocation memory blocks in the user-write data structure and therelocation data structure, respectively, in order based on blockwrite-erase endurance cycle count.
 16. The computer program product ofclaim 14, wherein selecting for the garbage collection operation atleast one of the user-write blocks and relocation blocks for erasureincludes selecting for erasure from among the user-write memory blocksand relocation memory blocks in the window the at least one user-writeblocks and relocation blocks based on an order in which the at least oneuser-write blocks and relocation blocks entered the user-write datastructure and the relocation data structure, respectively.
 17. Thecomputer program product of claim 14, further comprising adjusting aratio of user-write memory blocks relative to relocation memory blocksin the window based on a weight of a user-write workload.
 18. Thecomputer program product of claim 14, wherein the selected block isselected based on a number of invalid data pages in the selected block,the endurance cycle count of the selected block, and a predeterminedweight factor.